package com.lotter.concurrent;

import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.LinkedBlockingDeque;
import java.util.concurrent.SynchronousQueue;

public class TestList {

	public static void main(String args[]) {
		//List take poll(timeout)
		BlockingQueue blocking = new ArrayBlockingQueue<>(10);
		BlockingQueue blocking2 = new LinkedBlockingDeque<>();
		BlockingQueue blocking3 = new SynchronousQueue<>(true);
		//Map
		ConcurrentMap<Object, Object> map = new ConcurrentHashMap<>();//只锁住需要更新的部分，提高并发读的效率
	}
}
